import React from 'react';

const remoteCall = () => {
	return (
		<div onClick={() => {
			// const res = await fetch('http://localhost:3000/api/hello');
			// const data = await res.json();
			// alert(data.name);

			fetch('http://localhost:3000/api/hello').then(res => res.json()).then(data => alert(data.name));

		}}>remoteCall</div>
	);
};

export default remoteCall;